Getting Started Guide
145
There is a package Linux package of DOS tools called mtools that let you work
with DOS files within Linux. Utilities such as mcopy (for copying ), mdir (for
listing ) and mdel (for deleting) can all be used to work with DOS files. These
tools are useful for exchanging files with Windows/DOS systems and Linux
using DOS floppy diskettes. (However, you can also use /auto/floppy to copy
files to a DOS floppy diskette, using standard Linux commands.)
Environment variables
Environment variables provide information for programs running on your Linux
system. For example, an environment variable named HOME contains the path to
reach your home directory. Any program that needs to determine where your
home directory is located can ask for the value of the HOME environment vari-
able.
Linux includes a few standard environment variables such as the network host-
name of your computer and the location of your home directory. In addition,
many programs set up environment variables as part of their installation so that
they can locate components of your system as they run.
If you need to set an environment variable, you would normally add an export
line to a shell start-up file (such as .bashrc in your home directory). If you used
the bash shell (which is assigned by default), the line you add would look some-
thing like this (variable names are normally in upper case letters):
export VARIABLE_NAME=variable_value
Environment variables are part of each user’s account infor-
mation. If you log in using a different user account, many of
your environment variables could change.
If you used the csh shell, to set an environment variable you would add a setenv
line to the .cshrc file in your home directory that looked something like this:
CD
cd
DIR
ls -l (the -l option provides a detailed listing
similar to DIR)
TYPE filename | MORE
less filename
DEL filename
rm filename
DOS Command
Linux equivalent
TABLE 6 Common DOS commands and their Linux equivalents